package com.foreknow.elm.controller;

import com.foreknow.elm.po.Food;
import com.foreknow.elm.service.impl.FoodServiceImpl;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class FoodController {
    public Object listFoodByBusinessId(HttpServletRequest request){
        //获取前台请求参数  /FoodController/listFoodByBusinessId?businessId=?
        Integer businessId = Integer.parseInt(request.getParameter("businessId"));
        FoodServiceImpl foodService = new FoodServiceImpl();
        List<Food> list =foodService.listFoodByBusinessId(businessId);
        return list;
    }
}
